package com.woniu.dao;

import com.woniu.domain.CourseElectiveitem;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: ljy  <br/>
 * Date: 2021/6/8:12:19  <br/>
 * Description:选课持久化接口
 */


public interface CourseElectiveitemDao {

    @ApiOperation(value = "添加选课信息")
    @ApiImplicitParam(name = "courseElectiveitems",value = "选课对象集合")
    int addCourseElectiveitem(List<CourseElectiveitem> courseElectiveitems);

    @ApiOperation(value = "根据课程id查询选课信息")
    @ApiImplicitParam(name = "course",value = "课程id")
    List<CourseElectiveitem> getCourseElectiveitemByCid(@Param("courseId") Integer courseId);

    @ApiOperation(value = "根据课程id查询选课信息")
    @ApiImplicitParam(name = "course",value = "课程id")
    List<CourseElectiveitem> getCourseElectiveitemByCid(CourseElectiveitem courseElectiveitem);

    @ApiOperation(value = "根据条件选课信息")
    @ApiImplicitParam(name = "courseElectiveitem",value = "选课信息对象")
    List<CourseElectiveitem> conditionalQuery(CourseElectiveitem courseElectiveitem);

    @ApiOperation(value = "根据用户id查询选课信息")
    @ApiImplicitParam(name = "userId",value = "用户id")
    List<CourseElectiveitem> getCourseElectiveitemByUserId(@Param("userId") Integer userId);

    @ApiOperation(value = "根据选课id删除选课信息")
    @ApiImplicitParam(name = "id",value = "选课id")
    int delById(@Param("id") Integer id);


    @ApiOperation(value = "条件查询查询选课信息")
    @ApiImplicitParam(name = "courseElectiveitem",value = "选课对象")
    List<CourseElectiveitem> courseNameConditionQuery(CourseElectiveitem courseElectiveitem);
}
